package com.jk.smartelderlycare.controller;

import com.jk.smartelderlycare.dto.SysGoods;
import com.jk.smartelderlycare.interfaces.SysGoodsServiceApi;
import com.jk.smartelderlycare.pojo.PagedResponse;
import com.jk.smartelderlycare.service.SysGoodsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author hhk
 * @version 1.0
 * @ClassName SysGoodsController
 * @program: smart-elderly-care
 * @description: TODO
 * @date 2024/12/5 11:11
 */
@Slf4j
@RestController
public class SysGoodsController implements SysGoodsServiceApi {

    @Autowired
    private SysGoodsService sysGoodsService;
    /**
     * @description: 后端分页
     * @param: [sysGoods]
     * @return: void
     * @author hhk
     * @date: 2024/12/5 10:40
     */
    @Override
    public PagedResponse<SysGoods> findSysGoodsPaginationList(SysGoods sysGoods, Integer pageNum, Integer pageSize) {
        return sysGoodsService.findSysGoodsPaginationList(sysGoods,pageNum,pageSize);
    }
    /**
     * @description: 导出
     * @param: []
     * @return: java.util.List<com.jk.smartelderlycare.dto.SysGoods>
     * @author hhk
     * @date: 2024/12/5 10:43
     */
    @Override
    public List<SysGoods> findSysGoodsList() {
        return sysGoodsService.findSysGoodsList();
    }
}
